var __extends =
    (this && this.__extends) ||
    (function () {
      var t = function (e, o) {
        return (t =
          Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array &&
            function (t, e) {
              t.__proto__ = e;
            }) ||
          function (t, e) {
            for (var o in e)
              Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
          })(e, o);
      };
      return function (e, o) {
        function i() {
          this.constructor = e;
        }
        if ("function" != typeof o && null !== o)
          throw new TypeError(
            "Class extends value " + String(o) + " is not a constructor or null"
          );
        t(e, o),
          (e.prototype =
            null === o
              ? Object.create(o)
              : ((i.prototype = o.prototype), new i()));
      };
    })(),
  WorldCupGuessDialog = (function (t) {
    function e() {
      var e = t.call(this) || this;
      return (
        e.btn_world_jingcai.on(Laya.Event.CLICK, e, e.onDidClickJingCaiAction),
        WebSocketService.addListener({
          caller: e,
          code: 221122,
          method: e.onLoadWorldCupPeiLvData,
        }),
        e
      );
    }
    return (
      __extends(e, t),
      (e.showWorldCupDialog = function (t) {
        return (
          null == this.worldCupDialog &&
            ((this.worldCupDialog = new e()),
            (this.worldCupDialog.zOrder = 100)),
          this.worldCupDialog.popup(),
          (this.worldCupDialog.objDict = t),
          this.worldCupDialog.initData(t),
          this.worldCupDialog
        );
      }),
      (e.prototype.initData = function (t) {
        (this.lab_wc_guojia.text = t.countryName),
          (this.text_wc_zongjuesai.text = ""),
          (this.text_wc_guanjun.text = ""),
          (this.text_wc_4qiang.text = ""),
          (this.text_wc_8qiang.text = ""),
          (this.text_wc_16qiang.text = ""),
          (this.label_guanjun_pl.text = "赔率" + t.oddsForChampion + "倍"),
          (this.label_2_pl.text = "赔率" + t.oddsFor2 + "倍"),
          (this.label_4_pl.text = "赔率" + t.oddsFor4 + "倍"),
          (this.label_8_pl.text = "赔率" + t.oddsFor8 + "倍"),
          (this.label_16_pl.text = "赔率" + t.oddsFor16 + "倍");
      }),
      (e.prototype.onDidClickJingCaiAction = function () {
        var t = new Date(),
          e = t.getFullYear(),
          o = t.getMonth() + 1,
          i = t.getDate(),
          n = t.getHours();
        if (
          (console.log(e + "-" + o + "-" + i + "-" + n),
          !(2022 == e && 11 == o && 20 == i && n >= 22))
        ) {
          var r = "0",
            a = "0",
            l = "0",
            s = "0",
            c = "0";
          this.text_wc_guanjun.text.length > 0 &&
            (r = this.text_wc_guanjun.text),
            this.text_wc_zongjuesai.text.length > 0 &&
              (a = this.text_wc_zongjuesai.text),
            this.text_wc_4qiang.text.length > 0 &&
              (l = this.text_wc_4qiang.text),
            this.text_wc_8qiang.text.length > 0 &&
              (s = this.text_wc_8qiang.text),
            this.text_wc_16qiang.text.length > 0 &&
              (c = this.text_wc_16qiang.text),
            WebSocketService.send({
              c: 221122,
              d: {
                countryId: this.objDict.countryId,
                countryName: this.objDict.countryName,
                betFor16: c,
                betFor8: s,
                betFor4: l,
                betFor2: a,
                betForChampion: r,
              },
            });
        }
      }),
      (e.prototype.onLoadWorldCupPeiLvData = function (t) {
        ToastView.toastView(t.msg), this.close();
      }),
      e
    );
  })(ui.ActivityController.WorldCupGuessDialogUI);
